﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MainWap.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="LangMauViet.Models.Entity" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    ViewNews
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% var news = ((List<News>)ViewData["listNews"])[0];
       var otherNews = ((List<News>)ViewData["listOtherNews"]);
       var hotNews = (List<HotItem>)ViewData["listHot"]; %>
    <%--<div class="wap_hotTopic">
        <span>Chủ để HOT: </span>
        <br />
        <ul>
            <% if (!ReferenceEquals(hotNews, null))
               {
                   foreach (var hotItem in hotNews)
                   {%>
            <li><a href="/News/NewsDetail?id=<%=hotItem.NewsId %>">
                <%=hotItem.Title %></a></li>
            <%}
               }%>
        </ul>
        <div class="clear">
        </div>
    </div>--%>
    <div id="searchbox">
        <div class="keyword">
            <span class="hot">Chủ đề HOT</span>:
            <% if (!ReferenceEquals(hotNews, null))
               {
                   for (int i = 0; i < hotNews.Count; i++)
                   {
                       if (i < hotNews.Count - 1)
                       { %>
            <a href="/News/NewsDetail?id=<%=hotNews[i].NewsId %>">
                <%= hotNews[i].Title%></a> <span style="font-size: 12px;">|</span>
            <% }
                       else
                       {%>
             <a href="/News/NewsDetail?id=<%=hotNews[i].NewsId %>">
                <%= hotNews[i].Title%></a>
            <%}
                   }
               }%>
        </div>
    </div>
    <div class="clear">
    </div>
    <div class="wap_content_image_detail">
        <center>
            <img src='http://vipmobi.net:7001/mobile/download?v=1&w=250&id=<%=news.Icon%>' alt=""
                width="80%" />
        </center>
        <div class="wap_news_title">
            <b><%=news.Title %></b>
        </div>
        <div class="wap_news_content">
            <%=news.Content %>
        </div>
        <div class="wap_couldyoulike clear">
            <div class="wap_title">
                <span>Tin tức khác</span>
            </div>
            <div class="wap_content_row">
                <table cellpadding="0" cellspacing="0" width="100%">
                    <% if (!ReferenceEquals(otherNews, null))
                       {
                           foreach (News n in otherNews)
                           { %>
                    <tr>
                        <td valign="top" width="35%">
                            <div class="wap_content_image">
                                <a href="/News/NewsDetail?id=<%=n.NewsId %>">
                                    <img src='http://vipmobi.net:7001/mobile/download?v=1&w=250&id=<%=n.Icon%>' alt=""
                                        width="250" height="200" /></a>
                            </div>
                        </td>
                        <td valign="top">
                            <a href="/News/NewsDetail?id=<%=n.NewsId %>"><b>
                                <%= n.Title %></b></a>
                            <br />
                            <p>
                                <%=n.Description %></p>
                        </td>
                    </tr>
                    <% }
                       }

                    %>
                </table>
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="metaheader" runat="server">
</asp:Content>
